﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goods_add04.aspx.cs" Inherits="WebSite.admin.product.goods_add04" %>

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>福利点点通 </title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
 

   <script type="text/javascript" language="javascript">
       var i = 1
       function addFile() {
           if (i < 8) {
               var str = '<BR>&nbsp;&nbsp;&nbsp; 说明<input name="text" type="text" style="width: 100px" maxlength="20" /> 上传图片<input type="file" name="File" runat="server" style="width: 300px"/>'
               document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str)

           }
           else {
               alert("您一次最多只能上传8张图片！")
           }
           i++
       } 
   </script> 
</head>
<body class="bodyForm">
    <form id="form1" runat="server">
    <ext:PageManager ID="pageManager" runat="server" />
    <div>
    <center>


  <asp:Panel ID="Panel5" runat="server" Width="100%"> 
  <table Width="80%" border="0" cellpadding="0" cellspacing="0">
    <!-- 图片列表 -->
    <tr>
      <td>
      <asp:DataList ID="DataList1" runat="server" RepeatColumns="4" CellPadding="4" ForeColor="#333333" Height="96px" Width="98%">
       <ItemTemplate>
               <div id="gallery_1" style="float:left; text-align:center; border: 1px solid #DADADA; margin: 4px; padding:2px;">
                <a href="goods_add04.aspx?picid=<%# DataBinder.Eval(Container.DataItem, "picid")%>&gid=<%# DataBinder.Eval(Container.DataItem, "proid")%>&action=del" onclick="if (confirm('您确实要删除该图片吗？')){ }else{return false;}">[-]</a><br />
                <a href="../../uploadfile/<%# DataBinder.Eval(Container.DataItem, "picurl")%>" target="_blank">
                <img src="../../uploadfile/<%# DataBinder.Eval(Container.DataItem, "picurl")%>" height="100" width="100" border="0" />
                </a><br />
                <input value="<%# DataBinder.Eval(Container.DataItem, "content")%>" size="15" name="content_<%# DataBinder.Eval(Container.DataItem, "picid")%>" id="content_<%# DataBinder.Eval(Container.DataItem, "picid")%>"/>
              </div>
        </ItemTemplate>
      </asp:DataList>    
              </td>
          </tr>
          <tr><td>&nbsp;</td></tr>
    <!-- 上传图片 -->
    <tr>
      <td align="left"><P id="MyFile">
      <a onclick="addFile()" href="#">[+]</a> 说明<input name="text" type="text" style="width: 100px" maxlength="20" />
        上传图片<input id="File1" type="file" name="File" runat="server" style="width: 300px"/> </P></td>
    </tr>
    <tr>
      <td height="50" align="center"><table Width="98%" height="22" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" style="height: 24px; width: 758px;">
          <asp:ImageButton ID="ImageButton1" ImageUrl="../images/buttom-02.gif" runat="server" OnClick="ImageButton1_Click" />
       <a href="javascript:form1.reset();"><img src="../images/button03.gif" border="0" /></a></td>
       </tr>
       <tr>
            <td align="center" style="height: 24px; width: 758px;">
           <font color='red'> *图片最佳尺寸为600*600,图片大小不要超过300K </font>
            </td>
            </tr>
          </tr>
      </table></td>
    </tr>
  </table>
  </asp:Panel>

</center>
    </div>
    </form>
</body>
</html>
